package com.ly.demo.smsriskmanager;

import java.beans.ConstructorProperties;

/**
 * 包    名 ：com.vantai.dataplatform.ums.common.util
 * 文 件 名 : BizException
 * 描    述 : TODO
 * 作    者 ：zhaow zhaow
 * 创建时间 ：2021/6/15 15:10
 * 版    本 ：1.0
 */

public class BizException extends RuntimeException {
    private String code;
    private String message;

    public String getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }

    public void setCode(final String code) {
        this.code = code;
    }

    public void setMessage(final String message) {
        this.message = message;
    }

    public String toString() {
        return "BizException(code=" + this.getCode() + ", message=" + this.getMessage() + ")";
    }

    @ConstructorProperties({"code", "message"})
    public BizException(final String code, final String message) {
        this.code = code;
        this.message = message;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof BizException)) {
            return false;
        } else {
            BizException other = (BizException)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (!super.equals(o)) {
                return false;
            } else {
                Object this$code = this.getCode();
                Object other$code = other.getCode();
                if (this$code == null) {
                    if (other$code != null) {
                        return false;
                    }
                } else if (!this$code.equals(other$code)) {
                    return false;
                }

                Object this$message = this.getMessage();
                Object other$message = other.getMessage();
                if (this$message == null) {
                    if (other$message != null) {
                        return false;
                    }
                } else if (!this$message.equals(other$message)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof BizException;
    }

}

